syntax = "proto3"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; package Hexagon.NCS.ThirdParty.V1; service ThirdPartyService { rpc GetMachineList(google.protobuf.Empty) returns (GetMachineListResponse); rpc UploadInspectPlanFile(stream UploadInspectPlanFileRequest) returns (UploadInspectPlanFileResponse); rpc UploadInspectPlanFile2(stream UploadInspectPlanFile2Request) returns (UploadInspectPlanFileResponse); // Upload IP file and PPF file. rpc GetInspectPlanNotices(google.protobuf.Empty) returns (stream GetInspectPlanNoticesResponse); rpc GetProgramReportNotices(google.protobuf.Empty) returns (stream GetProgramReportNoticesResponse); rpc DownloadProgramReportFile(DownloadProgramReportFileRequest) returns (stream DownloadProgramReportFileResponse); rpc UploadMacroFile(stream UploadMacroFileRequest) returns (UploadMacroFileResponse); //Upload CNC macro file to machine. rpc UploadCncProgram(stream UploadCncProgramRequest) returns (UploadCncProgramResponse); //Upload CNC measurement program to machine. //AfM rpc GetProgramJournalNotices(google.protobuf.Empty) returns (stream GetProgramJournalNoticesResponse); rpc DownloadProgramJournalFile(DownloadProgramJournalFileRequest) returns (stream DownloadProgramJournalFileResponse); rpc GetPostFileExtension(GetPostFileExtensionRequest) returns (GetPostFileExtensionResponse); rpc GetServerInformation(google.protobuf.Empty) returns (GetServerInformationResponse); rpc GetProbeNames(GetProbeNamesRequest) returns (GetProbeNamesResponse); rpc GetProbeData(GetProbeDataRequest) returns (GetProbeDataResponse); rpc GetActiveMachineID(google.protobuf.Empty) returns (stream GetActiveMachineIDResponse); // trigger to create a new calibration for [AfM].[AxisCalibration] rpc GetMachineTolerance(GetMachineToleranceRequest) returns (GetMachineToleranceResponse); rpc GetVectorCompensationError(GetVectorCompensationErrorRequest) returns (GetVectorCompensationErrorResponse); rpc ReadCncVariable(ReadCncVariableRequest) returns (ReadCncVariableResponse); rpc WriteCncVariable(WriteCncVariableRequest) returns (WriteCncVariableResponse); rpc UpdateWorkOffset(UpdateWorkOffsetRequest) returns (UpdateWorkOffsetResponse); rpc UpdateToolOffset(UpdateToolOffsetRequest) returns (UpdateToolOffsetResponse); rpc GetPostComment(GetPostCommentRequest) returns (GetPostCommentResponse); // collect NC Server information & PC-DMIS information as comment rpc UploadReport(stream UploadReportRequest) returns (UploadReportResponse); // upload report to NCS & [HMI] rpc GetAxes(GetAxesRequest) returns (GetAxesResponse); // 2025.1 rpc ReadPosition(ReadPositionRequest) returns (ReadPositionResponse); rpc GetMachineStatusNotices(google.protobuf.Empty) returns (stream GetMachineStatusNoticesResponse); } enum gUnit { Unknown = 0; Inch = 1; Millimeter = 2; } enum gToolIdType { Auto = 0; ToolName = 1; ToolNumber = 2; } enum gAxisType { X = 0; Y = 1; Z = 2; U = 3; V = 4; W = 5; A = 6; B = 7; C = 8; } enum gWorkPlane { ZPlus = 0; XPlus = 1; YPlus = 2; ZMinus = 3; XMinus = 4; YMinus = 5; } enum MachineStatus { machine_offline = 0; machine_idle = 1; machine_running = 2; machine_alarm = 3; } message MachineEntity { int32 MachineId = 1; string MachineName = 2; string ControlType = 3; gUnit Unit = 4; bool IsEnabled = 5; bool IsConnected = 6; string CustomizedPostDirectory = 7; string ChannelType = 8; string ConnectText = 9; MachineStatus MachineState = 10; string MachineAlaramInfo = 11; string MachineProgramNumber = 12; } message PrimaryAxisEntity { string AxisName = 1; gAxisType AxisType = 2; double Min = 3; double Max = 4; } message WristAxisEntity { string AxisName = 1; gAxisType AxisType = 2; double Min = 3; double Max = 4; string LockMacro = 5; string UnlockMacro = 6; string RotaryMoveMacro = 7; } message RotaryTableAxisEntity { string AxisName = 1; gAxisType AxisType = 2; double Min = 3; double Max = 4; string LockMacro = 5; string UnlockMacro = 6; string RotaryMoveMacro = 7; bool IsCCW = 8; gWorkPlane WorkPlane = 9; } message GetMachineListResponse { repeated MachineEntity MachineList = 1; } message UploadInspectPlanFileRequest { int32 MachineId = 1; bytes FileData = 2; string FileName = 3; bool FileEOF = 4; } message UploadInspectPlanFile2Request { int32 MachineId = 1; string IPFileName = 2; bytes IPFileData = 3; bytes PPFFileData = 4; bool IPFileEOF = 5; bool PPFFileEOF = 6; } message UploadInspectPlanFileResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message GetInspectPlanNoticesResponse { int32 MachineId = 1; string FileName = 2; bool IsSuccess = 3; string ErrorInfo = 4; string ProgramPath = 5; string ProgramPathEncoding = 6; string ProbeName = 7; string ProbeNameEncoding = 8; string TipName = 9; string TipNameEncoding = 10; } message GetProgramReportNoticesResponse { int32 MachineId = 1; string ProgramName = 2; string ReportFileName = 3; } message DownloadProgramReportFileRequest { int32 MachineId = 1; string ProgramName = 2; string ReportFileName = 3; } message DownloadProgramReportFileResponse { bytes FileData = 1; bool FileEOF = 2; } message UploadMacroFileRequest { int32 MachineId = 1; bytes FileData = 2; string FileName = 3; bool FileEOF = 4; } message UploadMacroFileResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message UploadCncProgramRequest { int32 MachineId = 1; bytes FileData = 2; string FileName = 3; bool FileEOF = 4; } message UploadCncProgramResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message GetProgramJournalNoticesResponse { int32 MachineId = 1; string ProgramName = 2; string JournalFileName = 3; } message DownloadProgramJournalFileRequest { int32 MachineId = 1; string ProgramName = 2; string JournalFileName = 3; } message DownloadProgramJournalFileResponse { bytes FileData = 1; bool FileEOF = 2; } message GetPostFileExtensionRequest { int32 machineId = 1; } message GetPostFileExtensionResponse { string Extension = 1; string ControllerType = 2; } message GetServerInformationResponse { string ServerInformation = 1; } message GetProbeNamesRequest { int32 machineId = 1; } message GetProbeNamesResponse { repeated string ProbeNames = 1; } message GetProbeDataRequest { int32 MachineId = 1; string ProbeName = 2; gUnit ExpectedUnit = 3; } message GetProbeDataResponse { repeated TipData Tips = 1; } message TipData { string TipName = 1; double AngleA = 2; double AngleB = 3; double AngleC = 4; google.protobuf.Timestamp CalibratedTimestamp = 5; double MeasuredX = 6; double MeasuredY = 7; double MeasuredZ = 8; double MeasuredDiameter = 9; } message GetActiveMachineIDResponse { int32 MachineID = 1; } message GetMachineToleranceRequest { int32 MachineId = 1; } message GetMachineToleranceResponse { bool IsSuccess = 1; string MachineName = 2; double FixedBaseDeviationValue = 3; int32 LengthDependentDeviationValue = 4; double LengthDependentDeviationFloatValue = 5; double BacklashR0 = 6; double PFTU = 7; double RONt = 8; double THP = 9; double PFTj = 10; double PSTj = 11; double PLTj = 12; string ErrorInfo = 13; } message GetVectorCompensationErrorRequest { int32 MachineId = 1; string ProbeName = 2; string TipName = 3; double I = 4; double J = 5; double K = 6; gUnit ExpectedErrorUnit = 7; } message GetVectorCompensationErrorResponse { bool IsSuccess = 1; double Error = 2; string ErrorInfo = 3; } message ReadCncVariableRequest { int32 MachineId = 1; int32 Index = 2; int32 TimeoutInSeconds = 3; } message ReadCncVariableResponse { bool IsSuccess = 1; string ErrorInfo = 2; double Value = 3; } message WriteCncVariableRequest { int32 MachineId = 1; int32 Index = 2; double Value = 3; } message WriteCncVariableResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message UpdateWorkOffsetRequest { int32 MachineId = 1; string GCode = 2; string CNCProgramName = 3; double x = 4; double y = 5; double z = 6; double a = 7; double b = 8; double c = 9; } message UpdateWorkOffsetResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message UpdateToolOffsetRequest { int32 MachineId = 1; string ToolId = 2; gToolIdType ToolIdType = 3; string CNCProgramName = 4; string File = 5; double ToolDiameter = 6; double ToolLength = 7; } message UpdateToolOffsetResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message GetPostCommentRequest { int32 MachineId = 1; } message GetPostCommentResponse { bool IsSuccess = 1; string ErrorInfo = 2; string Comment = 3; } message UploadReportRequest { int32 MachineID = 1; string FileName = 2; bool PushToHMI = 3; bytes ByteArray = 4; bool FileEOF = 5; // optional, for Metrology Reporting(MR). Use either way#1 or way#2. Don't set any value if the report should not send to MR page // way #1 string GroupGuid = 6; // 32-bit GUID, like "157bcd5e-8222-4be8-b5b0-19675d878a38", one GroupID one card on MR webpage string GroupName = 7; string ProgramGuid = 8; // 32-bit GUID string ProgramName = 9; // way #2 string JsonBody = 10; // way#2 has priority over way#1 } message UploadReportResponse { bool IsSuccess = 1; string ErrorInfo = 2; } message GetAxesRequest { int32 MachineID = 1; } message GetAxesResponse { bool IsSuccess = 1; string ErrorInfo = 2; repeated PrimaryAxisEntity PrimaryAxes = 3; repeated WristAxisEntity WristAxes = 4; repeated RotaryTableAxisEntity RotaryTableAxes = 5; } message AxisPosition { string AxisID = 1; string AxisName = 2; double Value = 3; } message ReadPositionRequest { int32 MachineID = 1; } message ReadPositionResponse { bool IsSuccess = 1; string ErrorInfo = 2; repeated AxisPosition Positions = 3; } message GetMachineStatusNoticesResponse { int32 MachineId = 1; bool MachineIsConnected = 2; MachineStatus MachineState = 3; string MachineAlarmInfo = 4; string MachineProgramNumber = 5; }